<?php
class BizbaseAction extends Action{
	public $output =  array();
	public $isLogged = false;
	function _initialize(){
		$this->output = array(
			'result' => '0',
			'message' => ''
		);
	}
    //检测登录
    function checkLogin(){
		//验证登陆
		$passport	=	service('Passport');
		if($passport->isLogged()) {
			$this->isLogged = true;
			return true;
		}
		$this->output['message'] = L('LANG_NOTLOGIN');
		$this->isLogged = false;
		return false;
    }

//输出json格式
	function outputJson(){
		$this->output['isLogged'] = $this->isLogged;
		$this->output['message'] = (!$this->output['result'] && $this->output['message']=='')? (L('LANG_SOMEERR')) : ($this->output['message']) ;
		exit( json_encode( $this->output) );
	}
}
?>